#pragma once

#include "event.h"
#include "datareader.h"
#include <chrono>

namespace Lab1
{
    class DataBReader
    {
    public:
        static const std::chrono::milliseconds ResponseTime;
        explicit DataBReader( DataReader * reader );
        void start( int iterations, bool errorEnd );

    protected:
        void read();

    private:
        DataReader * reader;
        void sleepThread();
        int random(int min, int max);
    };

}

